package com.demo;
import com.model.Employees;
import com.model.Company;

/**
 * @author Erik
 * 主程序
 * @version 1.0
 * @see Employees
 * @see Company
 * @since JDK1.8
 */
public class demo {
    public static void main(String[] args){
        Company company_1=new Company("人事部");
        Company company_2=new Company("市场部");

        Employees ZhangMing=new Employees("张铭","S001","男","经理",29,company_1);
        Employees Li=new Employees("李艾爱","S002","女","助理",21,company_1);
        Employees Sun=new Employees("孙超","S004","男","职员",29,company_1);
        Employees Zhang=new Employees("张美美","S005","女","职员",26,company_2);
        Employees  Landy=new Employees("Landy","S006","男","经理",37,company_2);
        Employees   Milly=new Employees("Milly","S007","女","职员",24,company_2);

        //向人事部添加人员
        company_1.addEmployee(ZhangMing);
        company_1.addEmployee(Li);
        company_1.addEmployee(Sun);

        //向市场部添加人员
        company_2.addEmployee(Zhang);
        company_2.addEmployee(Landy);
        company_2.addEmployee(Milly);

        //员工信息
        System.out.println(ZhangMing.info());
        System.out.println("==========================================");
        System.out.println(Li.info());
        System.out.println("==========================================");
        System.out.println(Sun.info());
        System.out.println("==========================================");
        System.out.println(Zhang.info());
        System.out.println("==========================================");
        System.out.println(Landy.info());
        System.out.println("==========================================");
        System.out.println(Milly.info());
        System.out.println("==========================================");

        //人员数量统计
        System.out.println(company_1.info());
        System.out.println(company_2.info());
    }
}
